<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        * {
            margin: 0;
            padding: 0;
        }
        
        .box {
            width: 300px;
            height: 300px;
            background-color: red;
            /* border: 10px solid red; */
            /* float: left;s */
            /* display: inline-block; */
            overflow: hidden;
        }
        
        .box1 {
            width: 100px;
            height: 100px;
            background-color: green;
            /* float: left; */
            margin-top: 20px;
        }
        
        .box2 {
            width: 300px;
            height: 300px;
            background-color: blue;
            overflow: hidden;
            /* float: left */
            /* display: inline-block; */
        }
    </style>
</head>

<body>
    <div class="box">
        <div class="box1">
        </div>
    </div>
    <!-- <div class="box2"></div> -->
</body>

</html>